<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>kisebo: Código-Fonte de F:/Projetos/Rodrigo/kisebo/src/kisebo/Livro.cpp</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Gerado por Doxygen 1.5.7.1 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Página&nbsp;Principal</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Arquivos</span></a></li>
      <li><a href="dirs.html"><span>Diretórios</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;de&nbsp;Arquivos</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_e5fb231306b426dbf7288f735af63cb9.html">src</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_8c0497d54df0514193af848d7b3013ef.html">kisebo</a>
  </div>
</div>
<div class="contents">
<h1>Livro.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "Livro.h"</span>
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00004"></a>00004 
<a name="l00005"></a><a class="code" href="class_livro.html#4b89ad279d36589f7337083cdf006861">00005</a> <a class="code" href="class_livro.html#4b89ad279d36589f7337083cdf006861" title="Construtor padrão Construtor padrão do livro, utilizado para criar um livro.  ...">Livro::Livro</a>()
<a name="l00006"></a>00006 {
<a name="l00007"></a>00007         this-&gt;<span class="keywordtype">id</span> = -1;
<a name="l00008"></a>00008 }
<a name="l00009"></a>00009 
<a name="l00010"></a><a class="code" href="class_livro.html#9078ce3a5a33b406b18dc7459ac7cfc6">00010</a> <a class="code" href="class_livro.html#4b89ad279d36589f7337083cdf006861" title="Construtor padrão Construtor padrão do livro, utilizado para criar um livro.  ...">Livro::Livro</a>(<span class="keywordtype">long</span> _id, <span class="keywordtype">string</span> _titulo, <span class="keywordtype">string</span> _autor, <span class="keywordtype">string</span> _tema,
<a name="l00011"></a>00011                   <span class="keywordtype">double</span> _valor, <span class="keywordtype">string</span> _edicao, <span class="keywordtype">int</span> _anoPublicacao, <span class="keywordtype">string</span> _paginas){
<a name="l00012"></a>00012 
<a name="l00013"></a>00013         this-&gt;<span class="keywordtype">id</span> = _id;
<a name="l00014"></a>00014         this-&gt;<a class="code" href="class_livro.html#d6b669e1ed4f95c222d6c27b97db212d">titulo</a> = _titulo;
<a name="l00015"></a>00015         this-&gt;<a class="code" href="class_livro.html#ffacf9aa8e267a8fc99645b99375da8a">autor</a> = _autor;
<a name="l00016"></a>00016         this-&gt;<a class="code" href="class_livro.html#090e866f19b3351f77ef5bf5f9484a70">tema</a> = _tema;
<a name="l00017"></a>00017         this-&gt;<a class="code" href="class_livro.html#aebfd28adbd0f40a2f840c79f5859a16">valor</a> = _valor;
<a name="l00018"></a>00018         this-&gt;<a class="code" href="class_livro.html#a76734ab7e377b106d017bb9dc527ff8">edicao</a> = _edicao;
<a name="l00019"></a>00019         this-&gt;<a class="code" href="class_livro.html#522defcbd26d9af768080aa7fbfefeca">anoPublicacao</a> = _anoPublicacao;
<a name="l00020"></a>00020         this-&gt;<a class="code" href="class_livro.html#a4c7eebc7dcc6150d86dbfbb53c8793d">paginas</a> = _paginas;
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 }
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 
<a name="l00025"></a><a class="code" href="class_livro.html#1f3b49a5fbaf89727b0d0317e128655f">00025</a> <a class="code" href="class_livro.html#1f3b49a5fbaf89727b0d0317e128655f" title="Destrutor da classe. Destrutor para liberar mémoria do programa.">Livro::~Livro</a>()
<a name="l00026"></a>00026 {
<a name="l00027"></a>00027 }
<a name="l00028"></a>00028 
<a name="l00029"></a><a class="code" href="class_livro.html#b8a19d42497fd56cba1c6eeeb461a22a">00029</a> <span class="keywordtype">void</span> <a class="code" href="class_livro.html#b8a19d42497fd56cba1c6eeeb461a22a" title="Insere o id.">Livro::SetId</a>(<span class="keywordtype">long</span> _id){this-&gt;<span class="keywordtype">id</span> = _id;}
<a name="l00030"></a><a class="code" href="class_livro.html#092e980e8c4f24183bbd053303ab970a">00030</a> <span class="keywordtype">long</span> <a class="code" href="class_livro.html#092e980e8c4f24183bbd053303ab970a" title="Obtem o id do livro.">Livro::GetId</a>(){<span class="keywordflow">return</span> this-&gt;<a class="code" href="class_livro.html#96fa27980f3ba2342c0d1a3b022b95a1">id</a>;}
<a name="l00031"></a>00031 
<a name="l00032"></a><a class="code" href="class_livro.html#f90506b10434c82bc16aec8c2f353d74">00032</a> <span class="keywordtype">void</span> <a class="code" href="class_livro.html#f90506b10434c82bc16aec8c2f353d74" title="Insere o titulo no livro.">Livro::SetTitulo</a>(<span class="keywordtype">string</span> _titulo){this-&gt;<a class="code" href="class_livro.html#d6b669e1ed4f95c222d6c27b97db212d">titulo</a> = _titulo;}
<a name="l00033"></a><a class="code" href="class_livro.html#49933486534ff5d2939c03d94d16d26b">00033</a> <span class="keywordtype">string</span> <a class="code" href="class_livro.html#49933486534ff5d2939c03d94d16d26b">Livro::GetTitulo</a>(){<span class="keywordflow">return</span> this-&gt;<a class="code" href="class_livro.html#d6b669e1ed4f95c222d6c27b97db212d">titulo</a>;}
<a name="l00034"></a>00034 
<a name="l00035"></a><a class="code" href="class_livro.html#d38a883663f9112ed23364fb232c6a5b">00035</a> <span class="keywordtype">void</span> <a class="code" href="class_livro.html#d38a883663f9112ed23364fb232c6a5b" title="Insere o autor do livro.">Livro::SetAutor</a>(<span class="keywordtype">string</span> _autor){this-&gt;<a class="code" href="class_livro.html#ffacf9aa8e267a8fc99645b99375da8a">autor</a> = _autor;}
<a name="l00036"></a><a class="code" href="class_livro.html#1b10e53d83d5c082d47877cb78a5755e">00036</a> <span class="keywordtype">string</span> <a class="code" href="class_livro.html#1b10e53d83d5c082d47877cb78a5755e" title="Obtem o autor do livro.">Livro::GetAutor</a>(){<span class="keywordflow">return</span> this-&gt;<a class="code" href="class_livro.html#ffacf9aa8e267a8fc99645b99375da8a">autor</a>;}
<a name="l00037"></a>00037 
<a name="l00038"></a><a class="code" href="class_livro.html#b06bba014f3ece5a8201aa6f3b644f04">00038</a> <span class="keywordtype">void</span> <a class="code" href="class_livro.html#b06bba014f3ece5a8201aa6f3b644f04" title="insere o tema do livro.">Livro::SetTema</a>(<span class="keywordtype">string</span> _tema){this-&gt;<a class="code" href="class_livro.html#090e866f19b3351f77ef5bf5f9484a70">tema</a> = _tema;}
<a name="l00039"></a><a class="code" href="class_livro.html#2b453fcb3cc443bbde51ac45add3cc43">00039</a> <span class="keywordtype">string</span> <a class="code" href="class_livro.html#2b453fcb3cc443bbde51ac45add3cc43" title="Obtem o tema do livro.">Livro::GetTema</a>(){<span class="keywordflow">return</span> this-&gt;<a class="code" href="class_livro.html#090e866f19b3351f77ef5bf5f9484a70">tema</a>;}
<a name="l00040"></a>00040 
<a name="l00041"></a><a class="code" href="class_livro.html#80c136ea45939647a921dfe94b93549f">00041</a> <span class="keywordtype">void</span> <a class="code" href="class_livro.html#80c136ea45939647a921dfe94b93549f" title="Insere o preço em reias do livro.">Livro::SetValor</a>(<span class="keywordtype">double</span> _valor){this-&gt;<a class="code" href="class_livro.html#aebfd28adbd0f40a2f840c79f5859a16">valor</a> = _valor;}
<a name="l00042"></a><a class="code" href="class_livro.html#ca939892cc7ce33170ad1d8d20657ca0">00042</a> <span class="keywordtype">double</span> <a class="code" href="class_livro.html#ca939892cc7ce33170ad1d8d20657ca0" title="Obtem o preço.">Livro::GetValor</a>(){<span class="keywordflow">return</span> this-&gt;<a class="code" href="class_livro.html#aebfd28adbd0f40a2f840c79f5859a16">valor</a>;}
<a name="l00043"></a>00043 
<a name="l00044"></a><a class="code" href="class_livro.html#f59e91e7f3d4ebfd7539703755728314">00044</a> <span class="keywordtype">void</span> <a class="code" href="class_livro.html#f59e91e7f3d4ebfd7539703755728314" title="Insere a edição.">Livro::SetEdicao</a>(<span class="keywordtype">string</span> _edicao){this-&gt;<a class="code" href="class_livro.html#a76734ab7e377b106d017bb9dc527ff8">edicao</a> = _edicao;}
<a name="l00045"></a><a class="code" href="class_livro.html#232b743c2081c3d3f937c07703a97aeb">00045</a> <span class="keywordtype">string</span> <a class="code" href="class_livro.html#232b743c2081c3d3f937c07703a97aeb" title="Obtem a edição.">Livro::GetEdicao</a>(){<span class="keywordflow">return</span> this-&gt;<a class="code" href="class_livro.html#a76734ab7e377b106d017bb9dc527ff8">edicao</a>;}
<a name="l00046"></a>00046 
<a name="l00047"></a><a class="code" href="class_livro.html#7be3cb5a8f8e24675f2f9bf73c18a624">00047</a> <span class="keywordtype">void</span> <a class="code" href="class_livro.html#7be3cb5a8f8e24675f2f9bf73c18a624" title="Insere o Ano de Publicação.">Livro::SetAnoPublicacao</a>(<span class="keywordtype">int</span> _anoPublicacao){this-&gt;<a class="code" href="class_livro.html#522defcbd26d9af768080aa7fbfefeca">anoPublicacao</a> = _anoPublicacao;}
<a name="l00048"></a><a class="code" href="class_livro.html#bd7e6f9016a916fe962c604c0103c6c1">00048</a> <span class="keywordtype">int</span> <a class="code" href="class_livro.html#bd7e6f9016a916fe962c604c0103c6c1" title="Obtem o ano de publicação.">Livro::GetAnoPublicacao</a>(){<span class="keywordflow">return</span> this-&gt;<a class="code" href="class_livro.html#522defcbd26d9af768080aa7fbfefeca">anoPublicacao</a>;}
<a name="l00049"></a>00049 
<a name="l00050"></a><a class="code" href="class_livro.html#e10e9a5d5c2bfb0bff6f9889abb0f08e">00050</a> <span class="keywordtype">void</span> <a class="code" href="class_livro.html#e10e9a5d5c2bfb0bff6f9889abb0f08e" title="Insere a quantidade de páginas.">Livro::SetPaginas</a>(<span class="keywordtype">string</span> _paginas){this-&gt;<a class="code" href="class_livro.html#a4c7eebc7dcc6150d86dbfbb53c8793d">paginas</a> = _paginas;}
<a name="l00051"></a><a class="code" href="class_livro.html#a9c5ee56a562e05bada85a97a4d818e4">00051</a> <span class="keywordtype">string</span> <a class="code" href="class_livro.html#a9c5ee56a562e05bada85a97a4d818e4" title="Obtem a quantidade de páginas.">Livro::GetPaginas</a>(){<span class="keywordflow">return</span> this-&gt;<a class="code" href="class_livro.html#a4c7eebc7dcc6150d86dbfbb53c8793d">paginas</a>;}
<a name="l00052"></a>00052 
<a name="l00053"></a><a class="code" href="class_livro.html#a2f76d15f7a49649e707e23d7a917bde">00053</a> ostream&amp; operator &lt;&lt;(ostream &amp;_out, <span class="keyword">const</span> <a class="code" href="class_livro.html" title="Classe para controle dos livros.   Principal elemento do sistema.">Livro</a> &amp;_livro){
<a name="l00054"></a>00054 
<a name="l00055"></a>00055         _out &lt;&lt; <span class="stringliteral">"Detalhes do Livro "</span> &lt;&lt; _livro.<a class="code" href="class_livro.html#d6b669e1ed4f95c222d6c27b97db212d">titulo</a> &lt;&lt; endl;
<a name="l00056"></a>00056         _out &lt;&lt; <span class="stringliteral">"autor: "</span> &lt;&lt; _livro.<a class="code" href="class_livro.html#ffacf9aa8e267a8fc99645b99375da8a">autor</a> &lt;&lt; endl;
<a name="l00057"></a>00057         _out &lt;&lt; <span class="stringliteral">"tema: "</span> &lt;&lt; _livro.<a class="code" href="class_livro.html#090e866f19b3351f77ef5bf5f9484a70">tema</a> &lt;&lt; endl;
<a name="l00058"></a>00058         _out &lt;&lt; <span class="stringliteral">"edicao: "</span> &lt;&lt; _livro.<a class="code" href="class_livro.html#a76734ab7e377b106d017bb9dc527ff8">edicao</a> &lt;&lt; endl;
<a name="l00059"></a>00059         _out &lt;&lt; <span class="stringliteral">"publicado em: "</span> &lt;&lt; _livro.<a class="code" href="class_livro.html#522defcbd26d9af768080aa7fbfefeca">anoPublicacao</a> &lt;&lt; endl;
<a name="l00060"></a>00060         _out &lt;&lt; <span class="stringliteral">"quantidade paginas: "</span> &lt;&lt; _livro.<a class="code" href="class_livro.html#a4c7eebc7dcc6150d86dbfbb53c8793d">paginas</a> &lt;&lt; endl;
<a name="l00061"></a>00061         _out &lt;&lt; <span class="stringliteral">"valor R$"</span> &lt;&lt; _livro.<a class="code" href="class_livro.html#aebfd28adbd0f40a2f840c79f5859a16">valor</a> &lt;&lt; endl &lt;&lt; endl;
<a name="l00062"></a>00062 
<a name="l00063"></a>00063         <span class="keywordflow">return</span> _out;
<a name="l00064"></a>00064 
<a name="l00065"></a>00065 }
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Gerado em Wed Dec 3 04:35:41 2008 para kisebo por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>
